import VueI18n from 'vue-i18n'
import Vue from 'vue'
import Cookie from 'js-cookie'
import en from 'element-ui/lib/locale/lang/en'
import zh from 'element-ui/lib/locale/lang/zh-CN'
import En from './en'
import Zh from './zh'

Vue.use(VueI18n)

export default new VueI18n({
  locale: Cookie.get('lang') || 'zh',
  messages: {
    zh: { ...zh, ...Zh }, // 两个语言包的结合
    en: { ...en, ...En }
  }
})
